<?php
/**
 * Model representing service version.
 * It uses mapper to store service versions data in database table.
 * 
 * @author Damian Sromek <damianpaq@gmail.com>
 * @version 0.1
 */
// TODO: comment
// TODO: add checking setters parameters
class Plus_Model_News_Category_Category extends Plus_Model_Model_EnableDisable_DbTable_Abstract
{	
	/**
	 * Service version name.
	 * @var string
	 */
	protected $_name;
	
	/**
	 * Description of service version.
	 * @var unknown_type
	 */
	protected $_description;
	
	/**
	 * Creates service version model.
	 * @param $options array with service version data
	 * @return void
	 */
	public function __construct(array $options = array())
	{
		$options['idName'] = '_id';
		parent::__construct($options, 'Plus_Model_News_Category_Mapper');
		$this	->addVar('_id', 'id_news_category', 'Id')
				->addVar('_name', 'name', 'Name')
				->addVar('_isEnabled', 'is_enabled', 'IsEnabled')
				->addVar('_description', 'description', 'Description');
	}
	
	/**
	 * 
	 * @param $name service version name
	 * @return $this
	 */
	public function setName($name)
	{
		$this->_name = (string) $name;
		return $this;
	}
	
	/**
	 * 
	 * @return string service version name
	 */
	public function getName()
	{
		return $this->_name;
	}
	
	/**
	 * Sets description of the service version, eg. 'Demo allows You to ...'.
	 * @param $description new description of this service version
	 * @return $this
	 */
	public function setDescription($description)
	{
		$this->_description = $description;
		return $this;
	}
	
	/**
	 * 
	 * @return this service version description
	 */
	public function getDescription()
	{
		return $this->_description;
	}
}